<!-- src/views/DiagnosticView.vue -->
<template>
  <div class="diagnostic-view">
    <h1>系统诊断页面</h1>
    
    <div class="test-section">
      <h2>1. Vue.js 功能测试</h2>
      <p>响应式数据测试: {{ message }}</p>
      <button @click="message = 'Vue响应式工作正常!'">测试响应式</button>
    </div>

    <div class="test-section">
      <h2>2. HTML 渲染测试</h2>
      <div class="html-test">
        <p>这是一个段落</p>
        <button>这是一个按钮</button>
        <input type="text" placeholder="输入框测试">
        <table border="1">
          <tr><td>表格</td><td>测试</td></tr>
        </table>
      </div>
    </div>

    <div class="test-section">
      <h2>3. CSS 样式测试</h2>
      <div class="css-test">
        <div class="color-box red">红色盒子</div>
        <div class="color-box green">绿色盒子</div>
        <div class="color-box blue">蓝色盒子</div>
      </div>
    </div>

    <div class="test-section">
      <h2>4. 路由测试</h2>
      <router-link to="/dashboard">前往仪表盘</router-link> | 
      <router-link to="/courses">前往课程管理</router-link>
    </div>
  </div>
</template>

<script>
import { ref } from 'vue';

export default {
  name: 'DiagnosticView',
  setup() {
    const message = ref('初始消息');

    return {
      message
    };
  }
};
</script>

<style scoped>
.diagnostic-view {
  padding: 20px;
}

.test-section {
  margin-bottom: 30px;
  padding: 20px;
  border: 2px solid #ccc;
  border-radius: 8px;
}

.html-test {
  background: #f9f9f9;
  padding: 15px;
}

.css-test {
  display: flex;
  gap: 10px;
}

.color-box {
  padding: 20px;
  color: white;
  border-radius: 4px;
}

.red { background: red; }
.green { background: green; }
.blue { background: blue; }
</style>